Package-level declarations

Types

Link copied to clipboard
class Plane(point: Vec3d, normal: Vec3d)

Represents a 2D plane in a 3D world.

Properties

Link copied to clipboard
const val MOD_ID: String

The identifier of Staff Mod.

Inherited properties

Link copied to clipboard

Gets the approximate position of the item in the staff, when held my an entity.

Link copied to clipboard

Gets the approximate position of the staff's tip, when held by an entity.

Link copied to clipboard

Calculates the camera's upward direction based on Entity.getFacing and Entity.getHorizontalFacing.

Link copied to clipboard

Checks if the user has sufficient space in front to use the staff.

Link copied to clipboard
@get:JvmName(name = "hasStaffHandler")
val Item.hasStaffHandler: Boolean

Returns if the given item has a registered handler when inserted into a staff.

Link copied to clipboard

Checks if the player's attack is on cooldown.

Link copied to clipboard
@get:JvmName(name = "isItemInStaff")
val ItemStack.isItemInStaff: Boolean

Checks if an item is added the given staff item stack.

Link copied to clipboard

Checks if the given item stack is a staff.

Link copied to clipboard

Gets the item inserted into the given staff item stack.

Link copied to clipboard

Gets the item stack inserted into the given staff item stack. The value returned MUST NOT be modified in any way, use mutableItemStackInStaff instead.

Link copied to clipboard

Gets or sets a copy of the item stack inserted into the given staff item stack. The value returned or passed in can be freely modified.

Link copied to clipboard

Returns the registered staff handler of the given item if available.

Link copied to clipboard

Returns the registered staff handler of the given item if available, StaffHandler.Default otherwise.

Functions

Link copied to clipboard

Creates an EntityAttributeModifier, which changes the attack damage to totalAttackDamage after subtracting the player's base attack damage.

Link copied to clipboard

Creates an EntityAttributeModifier, which changes the attack speed to totalAttackSpeed after subtracting the player's base attack speed.

Link copied to clipboard
inline fun <T : IntSupplier> countingSort(input: Array<T>, k: Int): Array<T>

Sorts input using counting sort into a new array and returns it. The input array will not be changed.

Link copied to clipboard
fun encompassPositions(vararg positions: BlockPos): BlockBox?

Creates a BlockBox from encompassing the given positions.

Link copied to clipboard
fun encompassVectors(vararg posVectors: Vec3d): BlockBox?

Creates a BlockBox from encompassing the given vectors.

Link copied to clipboard

Creates an EntityAttributeModifier, which changes the attack speed to the reciprocal of totalEquipTime after subtracting the player's base attack speed.

Link copied to clipboard

Creates an EntityAttributeModifier, which increases the interaction range by additionalRange.

Inherited functions

Link copied to clipboard
inline operator fun Vec2f.component1(): Float
inline operator fun Vec3d.component1(): Double
inline operator fun Vec3i.component1(): Int
inline operator fun Vector3f.component1(): Float
Link copied to clipboard
inline operator fun Vec2f.component2(): Float
inline operator fun Vec3d.component2(): Double
inline operator fun Vec3i.component2(): Int
inline operator fun Vector3f.component2(): Float
Link copied to clipboard
inline operator fun Vec3d.component3(): Double
inline operator fun Vec3i.component3(): Int
inline operator fun Vector3f.component3(): Float
Link copied to clipboard
fun World.damageSource(damageKey: RegistryKey<DamageType>, source: Entity, attacker: Entity): DamageSource

Utility function to create a DamageSource.

Link copied to clipboard
fun EntityType<out Entity>.getSpawnPosition(world: World, center: Vec3d): Vec3d?

Gets the spawn position if the given entity has enough space to spawn at the given position, or null, if the position is obstructed by blocks.

Link copied to clipboard

Checks if the given item is on cooldown and cannot be used.

Link copied to clipboard
inline operator fun BlockPos.minus(other: Vec3i): BlockPos
inline operator fun Vec2f.minus(other: Vec2f): Vec2f
inline operator fun Vec3d.minus(other: Vec3d): Vec3d
inline operator fun Vec3i.minus(other: Vec3i): Vec3i
Link copied to clipboard
inline operator fun Vector3f.minusAssign(other: Vector3fc)
Link copied to clipboard
inline operator fun BlockPos.plus(other: Vec3i): BlockPos
inline operator fun Vec2f.plus(other: Vec2f): Vec2f
inline operator fun Vec3d.plus(other: Vec3d): Vec3d
inline operator fun Vec3i.plus(other: Vec3i): Vec3i
Link copied to clipboard
inline operator fun Vector3f.plusAssign(other: Vector3fc)
Link copied to clipboard
inline fun MatrixStack.push(action: MatrixStack.() -> Unit)

Pushes to the given matrix stack, invokes action, then pops from the given matrix stack.

Link copied to clipboard
inline operator fun BlockPos.times(scalar: Int): BlockPos
inline operator fun Vec2f.times(scalar: Float): Vec2f
inline operator fun Vec3d.times(scalar: Double): Vec3d
inline operator fun Vec3i.times(scalar: Int): Vec3i
Link copied to clipboard
inline operator fun Vector3f.timesAssign(scalar: Float)
Link copied to clipboard
inline operator fun BlockPos.unaryMinus(): BlockPos
inline operator fun Vec2f.unaryMinus(): Vec2f
inline operator fun Vec3d.unaryMinus(): Vec3d
inline operator fun Vec3i.unaryMinus(): Vec3i